package com.corona.game;

import com.corona.Game;

import java.util.function.Consumer;

/* compiled from: Action.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/Do4.class */
class Do4<T> extends Action {
    Consumer<? super T> consumer;
    T val;

    public Do4(Consumer<? super T> consumer, T val, Action nextAction) {
        super(new Object[0]);
        this.consumer = consumer;
        this.val = val;
        this.nextAction = nextAction;
    }

    /* JADX DEBUG: Type inference failed for r1v1. Raw type applied. Possible types: T, ? super T */
    @Override // com.corona.game.Action
    public void step(Game game) {
        this.consumer.accept((T) this.val);
        game.actionStack.remove(this);
        game.insertAction(this.nextAction);
    }
}
